﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using HFController;

namespace HFWebApp
{
    public partial class line : BagePages
    {
        public List<hf.Model.News> rotationNewsList = new List<hf.Model.News>();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                //List<hf.Model.Lawyer> online_list = LawyerController.getController().getLawyerList(4, "LastLoginTime");
                //4个在线律师
                online_layerList.DataSource = LawyerController.getController().getLawyerList(4, "LastLoginTime");
                online_layerList.DataBind();
                online_layerlist2.DataSource = LawyerController.getController().getLawyerList(6, "LastLoginTime");
                online_layerlist2.DataBind();

                //最新解决问题列表 10个
                newoverAsk_list.DataSource = AskController.getController().getAskList(10, 1);
                newoverAsk_list.DataBind();

                //推荐律师 5个
                lawyer_tuijianList.DataSource = LawyerController.getController().getLawyerList(5, 1);
                lawyer_tuijianList.DataBind();

                //分数排列律师
                lawyerPoint_List.DataSource = LawyerController.getController().getLawyerList(10, "Point");
                lawyerPoint_List.DataBind();

                //最新法律咨询
                newAsk_list.DataSource = AskController.getController().getAskList(10);
                newAsk_list.DataBind();

                //最新招聘信息
                recruitment_List.DataSource = JobsController.getController().getRecruitmentList(6);
                recruitment_List.DataBind();

                //最新应聘信息
                want_list.DataSource = JobsController.getController().getWantedList(8);
                want_list.DataBind();

                //最新法律委托
                caseDelegate_List.DataSource = DelegateController.getController().getCaseDelegateList(6, false);
                caseDelegate_List.DataBind();

                //律师合作
                team_list.DataSource = TeamworkController.getController().getTeamworkList(5);
                team_list.DataBind();

                //得到轮播新闻列表
                rotationNewsList = NewsController.getController().getNewsList(5, 1);
            }
        }
    }
}